package test;

import java.util.LinkedList;
import processing.core.PApplet;
import processing.core.PImage;

public class getLabel extends PApplet {

    PImage img;

    public void setup() {
        img = loadImage("c:\\usr\\1.jpg");
    }
    Detector bs;

    public void draw() {
        System.out.println("w:" + img.width + ", h:" + img.height);
        bs = new Detector(this, 0, 0, img.width, img.height, 255);
        bs.imageFindBlobs(img);
        for (int i = 0; i < bs.getBlobsNumber(); i++) {
            System.out.println("blob #" + (i + 1) + " is labelled " + bs.getLabel(i));
        }
        System.out.println("KONIEC");
    }

    static public void main(String[] passedArgs) {
       LinkedList<String> e=new LinkedList<>();
       
       for(int i=0; i<10; i++){
       e.add("Kolejność: "+i);
       }
       
       for(String s:e){
       System.out.println(s);
       }
    }
}